<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:vti="http://java.sun.com/jsf/composite/components/vti"
                template="/pages/templates/login_base.xhtml">
    <ui:define name="conteudo">
                                    <h:panelGroup id="formPassword" layout="block">
                                        <h:outputStylesheet library="css" name="password.css"
                                                            rendered="#{empty passwordService.id and empty passwordService.cod}" />
                                        <f:metadata>
                                            <f:viewParam name="id" value="#{passwordService.id}" />
                                            <f:viewParam name="cod" value="#{passwordService.cod}" />
                                            <f:event type="preRenderView" listener="#{passwordService.isValidCodigo(request,facesContext.externalContext.response)}" />
                                        </f:metadata>
                                        <h:form prependId="false">
                                            <h:panelGroup layout="block" class="input-req-login"
                                                          rendered="#{empty passwordService.id and empty passwordService.cod}">
                                                <h:outputLabel value="#{msgs['campo.senha.atual']}" for="senhaAtual" styleClass="labels" />
                                            </h:panelGroup>
                                            <h:panelGroup layout="block" class="input-field-login password-container"
                                                          rendered="#{empty passwordService.id and empty passwordService.cod}">
                                                <h:inputSecret id="senhaAtual" value="#{passwordService.senhaAtual}" />
                                            </h:panelGroup>
                                            <h:panelGroup layout="block" class="input-req-login">
                                                <h:outputLabel value="#{msgs['campo.nova.senha']}" for="senhaNova" styleClass="labels" />
                                            </h:panelGroup>
                                            <h:panelGroup layout="block" class="input-field-login password-container">
                                                <h:inputSecret id="senhaNova" value="#{passwordService.senhaNova}" />
                                            </h:panelGroup>
                                            <h:panelGroup layout="block" class="input-req-login">
                                                <h:outputLabel value="#{msgs['campo.confirmar.nova.senha']}" for="senhaRepet" styleClass="labels" />
                                            </h:panelGroup>
                                            <h:panelGroup layout="block" class="input-field-login password-container">
                                                <h:inputSecret id="senhaRepet" value="#{passwordService.senhaRepet}" />
                                            </h:panelGroup>
                                            <h:panelGroup layout="block" styleClass="gradeBotoes">
                                                <h:commandButton type="submit" action="#{passwordService.mudarSenha(request,facesContext.externalContext.response)}" value="#{msgs['botao.alterar.senha']}" styleClass="btnLogin" />
                                                <h:commandButton type="button" value="#{msgs['botao.sair']}" styleClass="btnSair"
                                                                onclick="document.location.href='#{request.contextPath}/j_spring_security_logout'" />
                                            </h:panelGroup>
                                        </h:form>
                                    </h:panelGroup>
    </ui:define>
</ui:composition>